package com.baizhi.service.impl;

import com.baizhi.dao.TreeDAO;
import com.baizhi.entity.Tree;
import com.baizhi.service.TreeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class TreeServiceImpl implements TreeService {

    @Autowired
    private TreeDAO treeDAO;

    @Override
    public List<Tree> showAll() {
        List<Tree> trees = treeDAO.selectAll();

        return trees;
    }

    @Override
    public Tree showById(int id) {
        return treeDAO.selectById(id);
    }
}
